package com.xjt.wx_admin.service;

import com.baomidou.mybatisplus.extension.api.R;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xjt.wx_admin.entity.MsgRecord;
import com.xjt.wx_admin.entity.dto.SendMsg;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author Xujt
 * @since 2023-03-22 11:33:28
 */
public interface MsgRecordService extends IService<MsgRecord> {


    /**
     * 查询好友聊天记录
     *
     * @param toId 好友id
     * @return {@link List}<{@link MsgRecord}>
     */
    Page<MsgRecord> queryUserMsg(Page page, Long toId);

    /**
     * 发送消息
     *
     * @param sendMsg 发送消息
     * @return {@link R}
     */
    R sendMsg(SendMsg sendMsg);
}
